#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
#include<assert.h>
#include"Queue.h"


typedef int BTDataType;
typedef struct BinartTreeNode
{
	BTDataType data;
	struct BinartTreeNode* left;
	struct BinartTreeNode* right;
}BTNode;


BTNode* BuyNode(BTDataType x);
void PrevOrder(BTNode* root);
void InOrder(BTNode* root);
void PostOrder(BTNode* root);
int TreeSize(BTNode* root);
int TreeHeight(BTNode* root);
int TreeKLevel(BTNode* root, int k); //求第K层节点的个数
BTNode* BinaryFindTree(BTNode* root, BTDataType x);
void LevelOrder(BTNode* root);       //层序遍历
bool TreeComplete(BTNode* root); //判断二叉树是否为完全二叉树
void TreeDestory(BTNode* root);